<h1>Email List</h1>

<table class='sortable' id='sortable'>
  <thead>
    <tr>
      <th>Id</th>
      <th>Email</th>
      <th>Person</th>
      <th>Client</th>
      <th>Created at</th>
      <th>Updated at</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($email_list as $email): ?>
    <tr>
      <td><a href="<?php echo url_for('email/show?id='.$email['id']) ?>"><?php echo $email->getid() ?></a></td>
      <td><?php echo $email->getemail() ?></td>
      <td><?php echo $email->getperson_id() ?></td>
      <td><?php echo $email->getclient_id() ?></td>
      <td><?php echo $email->getcreated_at() ?></td>
      <td><?php echo $email->getupdated_at() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('email/new') ?>">New</a>
